package com.car.postoffice.mailbox;

import java.util.LinkedList;
import java.util.Queue;

import com.car.postoffice.CMailReply;
import com.car.postoffice.IMailBox;

public class MemoryMailBox implements IMailBox {
	public Queue<CMailReply> replyQueue;
	
	public MemoryMailBox(){
		replyQueue = new LinkedList<CMailReply>();
	}
	
	@Override
	public boolean isEmpty() {
		return replyQueue.isEmpty();
	}

	@Override
	public CMailReply GetMail() {
		return replyQueue.poll();
	}

	@Override
	public void PutMail(CMailReply reply) {
		replyQueue.add(reply);
	}

}
